//
//  UIBarButtomItem+Extention.swift
//  weibo
//
//  Created by apple on 2017/5/22.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    /// 创建uibarbuttonitem
    ///
    /// - Parameters:
    ///   - title: title title
    ///   - fontSize: fontSize fontSize
    ///   - normalColor: normalColor normalColor
    ///   - highlightedColor: highlightedColor highlightedColor
    ///   - target: target target
    ///   - action: action action
    convenience init(title:String, fontSize:Float, normalColor:UIColor,highlightedColor:UIColor,target:Any?,action:Selector){
        let btn = UIButton.init(title: title, fontSize: fontSize, normalColor: normalColor, highlightedColor: highlightedColor)
        btn.addTarget(target, action:action, for: .touchUpInside)
        self.init(customView: btn)
        
    }
}
